/*
 *
 *
 */

#include "window_common.h"

#if GKT_IMAGE_ENABLE

#define WINDOW_IMAGE_ATTR(name, _width, _height)	\
	{	\
		.width	= _width,	\
		.height	= _height,	\
		.data	= sc_window_image_##name##_data,	\
	}

#define sc_window_image_none_data	NULL

#if (16 == WINDOW_WIDGET_NORMAL_HEIGHT)

static const uint8_t sc_window_image_battery_empty_data[] = {
	0x3C,0xFF,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0xFF
};
static const uint8_t sc_window_image_battery_25_data[] = {
	0x3C,0xFF,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0xBD,0xBD,0x81,0xFF
};
static const uint8_t sc_window_image_battery_50_data[] = {
	0x3C,0xFF,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xFF
};
static const uint8_t sc_window_image_battery_75_data[] = {
	0x3C,0xFF,0x81,0x81,0x81,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xFF
};
static const uint8_t sc_window_image_battery_full_data[] = {
	0x3C,0xFF,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xFF
};

static const uint8_t sc_window_image_lock_opend_data[] = {
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,
	0xF0,0xF8,0x7C,0x3C,0x1C,0x1C,0x1C,0x1C,0x3C,0x7C,0xF8,0xF0,0xE0,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0xC0,0xE0,0xF0,0xF0,0xF0,0xF0,0x70,0x70,0x70,0x70,0x70,0x7F,
	0x7F,0x7F,0xF0,0xF0,0xF0,0xF0,0xE0,0xC0,0x00,0x00,0x07,0x07,0x07,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x00,0x30,0x78,0xFC,0xFC,0x78,
	0x30,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x07,0x0F,0x1F,0x1F,0x1F,0x1E,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,
	0x1C,0x1C,0x1E,0x1F,0x1F,0x1F,0x0F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
static const uint8_t sc_window_image_lock_close_data[] = {
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF8,0x1C,0x0C,0x0C,0x0C,
	0x0C,0x0C,0x0C,0x1C,0xF8,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF8,0x18,0x18,0x1F,0x1F,0x18,0x18,0x18,0x18,
	0x18,0x18,0x18,0x18,0x1F,0x1F,0x18,0x18,0xF8,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x0C,0x1E,0x3F,
	0x3F,0x1E,0x0C,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
	0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
};

static const uint8_t sc_window_image_error_data[] = {
	0x00,0x00,0x1C,0x3C,0x7C,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0xF8,0x7C,0x3C,0x1C,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,0x3E,0x7C,0xF8,0xF0,0xE0,
	0xE0,0xF0,0xF8,0x7C,0x3E,0x1F,0x0F,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0xF8,0x7C,0x3E,0x1F,0x0F,0x07,
	0x07,0x0F,0x1F,0x3E,0x7C,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x38,0x3C,0x3E,0x1F,0x0F,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,0x3E,0x3C,0x38,0x00,0x00,
};

static const gkt_image_attr_s sc_window_image_monochrome_col_attrs[] = {
	WINDOW_IMAGE_ATTR(none,0,0),
	WINDOW_IMAGE_ATTR(battery_empty,16,8),
	WINDOW_IMAGE_ATTR(battery_25,16,8),
	WINDOW_IMAGE_ATTR(battery_50,16,8),
	WINDOW_IMAGE_ATTR(battery_75,16,8),
	WINDOW_IMAGE_ATTR(battery_full,16,8),
	WINDOW_IMAGE_ATTR(lock_opend,32,32),
	WINDOW_IMAGE_ATTR(lock_close,32,32),
	WINDOW_IMAGE_ATTR(error,32,32),
};

#elif (20 == WINDOW_WIDGET_NORMAL_HEIGHT)

static const uint8_t sc_window_image_battery_empty_data[] = {
	0x3C,0xFF,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0xFF
};
static const uint8_t sc_window_image_battery_25_data[] = {
	0x3C,0xFF,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0xBD,0xBD,0x81,0xFF
};
static const uint8_t sc_window_image_battery_50_data[] = {
	0x3C,0xFF,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xFF
};
static const uint8_t sc_window_image_battery_75_data[] = {
	0x3C,0xFF,0x81,0x81,0x81,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xFF
};
static const uint8_t sc_window_image_battery_full_data[] = {
	0x3C,0xFF,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xBD,0xBD,0x81,0xFF
};

static const uint8_t sc_window_image_lock_opend_data[] = {
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x80,0xC0,0xE0,0xE0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xE0,0xE0,0xC0,0x80,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,
	0x00,0x00,0xFC,0xFE,0xFF,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x87,0xC7,0xC7,0x87,0x07,0x07,
	0x07,0x07,0x07,0x07,0x07,0x07,0xFF,0xFE,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x0F,0x0F,0x07,0x03,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x01,0x03,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
	0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};

static const uint8_t sc_window_image_lock_close_data[] = {
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xE0,0xE0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xE0,
	0xE0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x01,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0xFC,0xFE,0xFF,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x87,0xC7,0xC7,0x87,0x07,0x07,
	0x07,0x07,0x07,0x07,0x07,0x07,0xFF,0xFE,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x07,0x0F,0x0F,0x07,0x03,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x01,0x03,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
	0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};

static const uint8_t sc_window_image_error_data[] = {
	0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,0x3E,0x7C,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00,
	0x00,0x00,0x80,0xC0,0xE0,0xF0,0xF8,0x7C,0x3E,0x1F,0x0F,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0xC3,0xE7,0xFF,0xFF,0x7E,
	0x7E,0xFF,0xFF,0xE7,0xC3,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0xF8,0x7C,0x3E,0x1F,0x0F,0x07,0x03,0x01,0x00,0x00,
	0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,0x3E,0x7C,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x07,0x07,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00
};

static const gkt_image_attr_s sc_window_image_monochrome_col_attrs[] = {
	WINDOW_IMAGE_ATTR(none,0,0),
	WINDOW_IMAGE_ATTR(battery_empty,16,8),
	WINDOW_IMAGE_ATTR(battery_25,16,8),
	WINDOW_IMAGE_ATTR(battery_50,16,8),
	WINDOW_IMAGE_ATTR(battery_75,16,8),
	WINDOW_IMAGE_ATTR(battery_full,16,8),
	WINDOW_IMAGE_ATTR(lock_opend,40,40),
	WINDOW_IMAGE_ATTR(lock_close,40,40),
	WINDOW_IMAGE_ATTR(error,40,40),
};

#else
#erorr "Not Support!"
#endif

void window_image_init(void)
{
	gkt_image_set_attrs(sc_window_image_monochrome_col_attrs,
			sizeof(sc_window_image_monochrome_col_attrs) / sizeof(gkt_image_attr_s));
}

#endif

